const autoprefixer = require('autoprefixer');
const pxtorem = require('postcss-pxtorem');

module.exports = {
  outputDir: 'dist',
  lintOnSave: true,
  publicPath: process.env.NODE_ENV === 'production' ? './' : '/',
  css: {
    loaderOptions: {
      postcss: {
        plugins: [
          autoprefixer(),
          pxtorem({
            rootValue: 37.5,
            propList: ['*']
          })
        ]
      }
    }
  },
  devServer: {
    port: 9093,
    host: 'localhost',
    hot:true,
    open: true,
    inline: true,
    disableHostCheck: true,
    overlay: {
      warning: false,
      errors: false
    },
    // open: true,
    // proxy: {
    //   '/': {
    //     target: 'http://112.74.191.63/agencyapi',
    //     changeOrigin: true,
    //     ws: true,
    //   }
    // },    
    disableHostCheck: true
  },
};
